-- GENERATED SPELL FOR [Captain Stillwater] --


function spell0_2550(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(11975,pUnit)
pUnit:RegisterEvent('Sorts_2550', 1500, 1)
end

function spell1_2550(pUnit, Event) --@Flame Spike,n/a--
pUnit:FullCastSpellOnTarget(6725,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2550', 12000, 1)
end

function spell2_2550(pUnit, Event) --@Slow,n/a--
pUnit:FullCastSpellOnTarget(36843,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2550', 12000, 1)
end

function Sorts_2550(pUnit, Event)
local choix_sorts_2550 = math.random(0, 2)
if choix_sorts_2550 == 0 then
pUnit:RegisterEvent('spell0_2550', 1, 1)
end
if choix_sorts_2550 == 1 then
pUnit:RegisterEvent('spell1_2550', 1, 1)
end
if choix_sorts_2550 == 2 then
pUnit:RegisterEvent('spell2_2550', 1, 1)
end
end

function mob2550_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2550', math.random(1500, 3000), 1)
end

function mob2550_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2550_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2550_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2550, 1, 'mob2550_Action')
RegisterUnitEvent(2550, 2, 'mob2550_Leave')
RegisterUnitEvent(2550, 3, 'mob2550_Kill')
RegisterUnitEvent(2550, 4, 'mob2550_Die')
